package com.luych.toolbox.common.feign.view.data.service;

import com.luych.toolbox.common.enums.DataUpgradeStatus;
import com.luych.toolbox.common.enums.DataUpgradeType;
import com.luych.toolbox.common.feign.FeignView;
import com.luych.toolbox.common.feign.view.base.service.UserView;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.Date;
import java.util.List;

@ApiModel("数据升级")
public class DataUpgradeView extends FeignView {

    @ApiModelProperty("数据项目")
    private DataProjectView dataProject;
    @ApiModelProperty("描述")
    private String name;
    @ApiModelProperty("类型")
    private DataUpgradeType type;
    @ApiModelProperty("状态")
    private DataUpgradeStatus status;
    @ApiModelProperty("责任人")
    private UserView owner;
    @ApiModelProperty("开始时间")
    private Date startDate;
    @ApiModelProperty("结束时间")
    private Date completeDate;
    @ApiModelProperty("详情")
    private List<DataUpgradeDetailView> details;

    public DataProjectView getDataProject() {
        return dataProject;
    }

    public String getDataProjectId() {
        return dataProject == null ? null : dataProject.getId();
    }

    public void setDataProject(DataProjectView dataProject) {
        this.dataProject = dataProject;
    }

    public DataUpgradeType getType() {
        return type;
    }

    public String getTypeValue() {
        return type == null ? null : type.getValue();
    }

    public void setType(DataUpgradeType type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public DataUpgradeStatus getStatus() {
        return status;
    }

    public void setStatus(DataUpgradeStatus status) {
        this.status = status;
    }

    public String getStatusValue() {
        return status == null ? null : status.getValue();
    }

    public UserView getOwner() {
        return owner;
    }

    public void setOwner(UserView owner) {
        this.owner = owner;
    }

    public String getOwnerId() {
        return owner == null ? null : owner.getId();
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getCompleteDate() {
        return completeDate;
    }

    public void setCompleteDate(Date completeDate) {
        this.completeDate = completeDate;
    }

    public List<DataUpgradeDetailView> getDetails() {
        return details;
    }

    public void setDetails(List<DataUpgradeDetailView> details) {
        this.details = details;
    }
}
